<template>
	<view>
		<view class="title">{{detail.title}}</view>
		<view class="info">
			<view class="name">{{detail.author}}</view>
			<view class="date">{{detail.posttime}}</view>
		</view>
		
		<view class="content">
			<rich-text :nodes="detail.content"></rich-text>
		</view>
		<view class="desc">声明:文章内容仅用于学习使用,如有侵权,立刻删除</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				option:null,
				detail:{}
			}
		},
		methods: {
			
		},
		onLoad(e) {
			this.option=e
			uni.request({
				url:"https://ku.qingnian8.com/dataApi/news/detail.php",
				data:{
					cid:this.option.cid,
					id:this.option.id
				},
				success: (res) => {
					console.log(res)
					this.detail=res.data
				}
			})
		}
	}
</script>

<style lang="scss" scoped>
.title{
	font-size: 40rpx;
	padding: 20rpx;
	font-weight: bolder;
}
.info{
	background-color: #f7f7f7;
	display: flex;
	justify-content: space-between;
	.name{
		font-size: 30rpx;
		padding: 12rpx;
	}
	.date{
		font-size: 30rpx;
		padding: 12rpx;
	}
}
.content{
	font-size: 36rpx;
	padding:18rpx;
}
.desc{
	color: orangered;
}
</style>
